package com.orm.mybatis.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ReturnWithNoData {
    private Integer rv;
    private String  msg;

    public static ReturnWithNoData success(){
      return new ReturnWithNoData(200,"success");
    }
    public static ReturnWithNoData success(String success){
      return new ReturnWithNoData(200,success);
    }

    public static ReturnWithNoData error(){
        return new ReturnWithNoData(400,"fail");
    }

    public static ReturnWithNoData error(String error){
        return new ReturnWithNoData(400,error);
    }

}

